clear all
set maxvar 5000

*ssc install blindschemes
*ssc install binscatter

cd "/Users/tg2778/Dropbox/0_Reviews_RnRs/072022_JOP_Roads/v3_JOP/Replication - Roads"
log using "4_Log/3_Binscatter.log"

use "1_Data/pmgsycensuscombined2.dta", clear

set scheme plotplain
binscatter pc11r_hl_light_source_elec pc01_vd_t_p if pc01_vd_t_p >=1 & pc01_vd_t_p <=3000, nquantiles(20) xtitle("Population (Census 2001)") ytitle("Percentage households connected with electricity") linetype(none) msymbol(solid) xlabel(0(250)3000) ysc(r(0, 100)) yla(0(10)100, grid gmin gmax)
graph export "3_Figs/FigC2A.pdf", as(pdf) replace

binscatter pc11r_hl_latrine_oth_open pc01_vd_t_p if pc01_vd_t_p >=1 & pc01_vd_t_p <=3000, nquantiles(20) xtitle("Population (Census 2001)") ytitle("Percentage households provided with toilets") linetype(none) msymbol(solid) xlabel(0(250)3000) ysc(r(0, 100)) yla(0(10)100, grid gmin gmax)
graph export "3_Figs/FigC2B.pdf", as(pdf) replace
log close
